<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<link rel="stylesheet" href="css/common.css" />
		
		<script type="text/javascript" src="js/angular.min.js" ></script>
		<script type="text/javascript" src="js/jquery-2.1.1.min.js" ></script>
		<script type="text/javascript" src="js/global.js" ></script>
		
		<style rel="stylesheet">
			/**************header部分*****************/
			header{
				height:50px;
				width: 100%;
				line-height: 50px;
				text-align: center;
				font-size: 16px;
				background: rgb(245,245,245);
				position: fixed;
				top: 0px;left: 0px;
				z-index: 999;
				border-bottom: 1px solid rgb(208,217,214);
			}
			header span{
				float: left;
				padding-left: 5%;
				color: rgb(20,121,87);
			}
			header span img{
				vertical-align: middle;
				width: 11px;
			    height: 21px;
			    margin-right: 4px;
			
			}
			/************section部分**********/
			section{
			    position: absolute;
			    top: 50px; left: 0px; right: 0px; bottom: 0px; 
			    background: white;
			    /* overflow-y :auto; */
			    color: rgb(85,85,85);
			}
			#main{
				width: 90%;
				margin-left: 5%;
			}
			#headline{
				width: 100%;
				line-height: 25px;
				margin-top: 21px;
				font-size: 16px;
				font-weight: bold;
			}
			#time{
				width: 100%;
				color: lightgray;
			}
			#text{
				width: 100%;
				margin-top: 10px;
			}
			#text img{
				width: 100%;
				height: 200px;
			}
		</style>
	</head>
	<body>
		<header>
			<span class="return"><a href="javascript:void(0)" onclick="javascript :history.go(-1)"><img src="image/返回.png"></a></span>
		</header>
		<section ng-app="myApp" ng-controller="myCtrl">
			<div id="main">
	            <p id="headline">{{ arr.title }}</p>
	            <p id="time">{{ arr.modifiedTime }}</p>
	            <div id="text"></div>
			</div>
		</section>
	</body>
	<script type="text/javascript">
		var getCode = getQueryString('code'); 
		var app = angular.module("myApp",[]);
		
		app.controller("myCtrl",function($scope,$http){
			var params = {
	            code : getCode
			};
			params = $.param(params);
			$http({
		        method : "post",
		        dataType: "json",
				withCredentials: true,	//跨域名请求。XHR：XMLHttpRequest (XHR) ，基于XML技术的Http请求
			    crossDomain: true,
			    headers:{'Content-Type': 'application/x-www-form-urlencoded'},
			    data : params,
		        //async:true,
		        url : host + "/terminal/educationArcticles/detail"
		   }).success(function(response){
		        if(response.code == 2000){
		        	$scope.arr = response.data.info;
		        	$("#text").html($scope.arr.content);
		        }
		    });
		})
	</script>
</html>
